//
//  WeatherView.m
//  WeatherOFChangsha
//
//  Created by zkingsoft on 15/12/15.
//  Copyright (c) 2015年 zkingsoft. All rights reserved.
//

#import "WeatherView.h"

@implementation WeatherView

- (instancetype)init{
    self = [super init];
    if (self) {
        // 创建背景
        self.backGroundImageView = [[UIImageView alloc] init];
        self.backGroundImageView.userInteractionEnabled = YES;
        [self addSubview:self.backGroundImageView];
        [self.backGroundImageView setImage:[UIImage imageNamed:@"sun.png"]];
        
        [self.backGroundImageView makeConstraints:^(MASConstraintMaker *make) {
            make.edges.equalTo(self).with.insets(UIEdgeInsetsMake(0, 0, 0, 0));
        }];
    }
    return self;
}


// 初始化视图
- (void)InitView{
    self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
    self.tableView.showsVerticalScrollIndicator = NO;
    self.tableView.showsHorizontalScrollIndicator = NO;
    [self.backGroundImageView addSubview:self.tableView];
    [self.tableView makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.backGroundImageView);
    }];
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
